#include <iostream>
#include <vector>

using namespace std;

void select_sort(vector<int> &vec)
{
    int len = vec.size();
    int minIndex;
    for(int i = 0; i < len; ++i)
    {
        minIndex = i;
        for(int j = i + 1;j < len; ++j)
        {
            if(vec[j] < vec[minIndex])
            {
                minIndex = j;
            }
            swap(vec[i],vec[minIndex]);
        }
    }
}
int main()
{
    int num;
    cin >> num;

    vector<int> vec;
    int temp;
    for(int i= 0; i < num; i++)
    {
        cin >> temp;
        vec.push_back(temp);
    }

    select_sort(vec);

    for(vector<int>::iterator it = vec.begin(); it != vec.end(); ++it)
    {
        cout << *it << " ";
    }
    cout << endl;

    return 0;
}
